-- GENERATED SPELL FOR [Sharpshooter Guard] --


function spell0_17622(pUnit, Event) --@Incendiary Shot,n/a--
pUnit:FullCastSpellOnTarget(30481,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17622', 13000, 1)
end

function spell1_17622(pUnit, Event) --@Incendiary Shot,n/a--
pUnit:FullCastSpellOnTarget(35945,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17622', 13000, 1)
end

function spell2_17622(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17622', 656, 1)
end

function spell3_17622(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17622', 537, 1)
end

function spell4_17622(pUnit, Event) --@Viper Sting,Drain--
pUnit:FullCastSpellOnTarget(37551,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_17622', 8000, 1)
end

function Sorts_17622(pUnit, Event)
local choix_sorts_17622 = math.random(0, 4)
if choix_sorts_17622 == 0 then
pUnit:RegisterEvent('spell0_17622', 1, 1)
end
if choix_sorts_17622 == 1 then
pUnit:RegisterEvent('spell1_17622', 1, 1)
end
if choix_sorts_17622 == 2 then
pUnit:RegisterEvent('spell2_17622', 1, 1)
end
if choix_sorts_17622 == 3 then
pUnit:RegisterEvent('spell3_17622', 1, 1)
end
if choix_sorts_17622 == 4 then
pUnit:RegisterEvent('spell4_17622', 1, 1)
end
end

function mob17622_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17622', math.random(1500, 3000), 1)
end

function mob17622_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17622_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17622_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17622, 1, 'mob17622_Action')
RegisterUnitEvent(17622, 2, 'mob17622_Leave')
RegisterUnitEvent(17622, 3, 'mob17622_Kill')
RegisterUnitEvent(17622, 4, 'mob17622_Die')
